<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
    <%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<style type="text/css">
* {
	margin: 0;
	padding: 0;
}

#topdiv {
	border-bottom: 2px solid #C2C2C2;
	width: 100%;
	height: 110px;
	background-color: #4F4F4F;
	color: #e3e4e5;
}

#tleftdiv {
	/*  border:1px solid #000;  */
	width: 23%;
	height: 110px;
	float: left;
	text-align: center;
	line-height: 110px;
}

#topspan1 {
	width: 100px;
	height: 105px;
	float: left;
}

#topspan2 {
	width: 160px;
	height: 75px;
	font-size: 35px;
	font-family: "华文行楷";
	color: #BDBDBD;
	float: left;
}

#trightdiv {
	/* border:1px solid #000; */
	width: 77%;
	height: 60px;
	float: right;
}

#topspan3, #topspan4 {
	/*  border:1px solid #000; */
	width: 150px;
	height: 70px;
	float: left;
	text-align: center;
	line-height: 60px;
}

#topul {
	margin: 0px;
	padding: 0px;
	width: 250px;
	height: 70px;
	float: right;
}

#topul li {
	text-align: center;
	line-height: 70px;
	/* border:1px solid #000; */
	float: right;
	width: 80px;
	height: 30px;
	list-style: none;
}

#topul2 {
	/* margin-top: 10px; */
	    margin-left: -95px;
    margin-top: 4px;
	padding: 0px;
	width: 100%;
	height: 30px;
	float: left;
}

#topul2 li {
	float: left;
	/* border:1px solid #000; */
	width: 90px;
	height: 30px;
	margin-right:10px;
	list-style: none;
	text-align: center;
	line-height: 30px;
	box-shadow: #404040 1px 1px 1px 1px;
	cursor: pointer;
}

#leftdiv {
	border-right: 2px solid #C2C2C2;
	width: 15%;
	height: 700px;
	/* overflow: hidden; */
	float: left;
	display: block;
	background-color: #4F4F4F;
	color: #e3e4e5;
}

#rightdiv {
	/*  border:1px solid #000;  */
	width: 84%;
	height: 700px;
	/* overflow: hidden; */
	float: right;
	display: block;
	background-color: buttonface;
}

.menu_list {
	margin: 0 auto;
	width: 15%;
}

.menu_head {
	width: 100%;
	height: 47px;
	line-height: 47px;
	text-align: center;
	font-size: 15px;
	color: #e3e4e5;
	cursor: pointer;
	border: 1px solid #e1e1e1;
	position: relative;
	font-weight: bold;
	background: #4f4f4f url(../img/pro_left.png) center right no-repeat;
	margin: 0;
}

.menu_list .current {
	background: #4f4f4f url(../img/pro_down.png) center right no-repeat;
}

.menu_body {
	width: 100%;
	height: auto;
	overflow: hidden;
	line-height: 38px;
	border-left: 1px solid #e1e1e1;
	backguound: #4f4f4f;
	border-right: 1px solid #e1e1e1;
}
a{
   cursor: pointer;
}
.menu_body a {
	display: block;
	width: 100%;
	height: 38px;
	line-height: 38px;
	text-align: center;
	font-size: 12px;
	color: #fff;
	background: buttonshadow;
	text-decoration: none;
	border-bottom: 1px solid #e1e1e1;
}
#box{ margin:10px auto; width:150px; min-height:25px; background:#f4f4f4}
.menu_body a:hover {
	text-decoration: none;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-3.1.0.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/diyUpload/css/webuploader.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/diyUpload/css/diyUpload.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/diyUpload/js/webuploader.html5only.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/diyUpload/js/diyUpload.js"></script>


<script type="text/javascript">
	$(function() {
		/*主菜单*/
		$(".menu_list .menu_body a").hover(function() {
			$(this).css("background-color", "#DD0000");
		}, function() {
			$(this).css("background-color", "buttonshadow");
		});
		$("#leftdiv .menu_body:eq(0)").show();
		$("#leftdiv p.menu_head").click(
				function() {
					$(this).addClass("current").next("div.menu_body")
							.slideToggle(300).siblings("div.menu_body")
							.slideUp("slow");
					$(this).siblings().removeClass("current");
				});
		$("#secondpane .menu_body:eq(0)").show();
		$("#secondpane p.menu_head").mouseover(
				function() {
					$(this).addClass("current").next("div.menu_body")
							.slideDown(500).siblings("div.menu_body").slideUp(
									"slow");
					$(this).siblings().removeClass("current");
				});
		/*子菜单：*/
		$("#tone").click(
				function() {
					$.getJSON("../OrdersServlet?method=findAllOrders&pc=" + 1,
							{}, function(data) {
								if (data == "0")
									$("#rightdiv").load("ordersAll.jsp");
							});
				});
		$("#ttwo").click(
				function() {
					$.getJSON("../OrdersServlet?method=findAllOrders&pc=" + 1,
							{}, function(data) {
								if (data == "0")
									$("#rightdiv").load("orderfind.jsp");
							});
				});
	    $.ajaxSettings.async = false; 
		$("#tthree").click(function() {
			$("#rightdiv").load("addOrders.jsp");
		});
		$("#ftwo").click(function() {
			$("#rightdiv").load("addUsers.jsp");
		});
		$("#tfour").click(
				function() {
					$.getJSON("../OrdersServlet?method=findsendOrders&pc=" + 1,
							{}, function(data) {
								if (data == "0")
									$("#rightdiv").load("sendOrders.jsp");
							});
				});
		$(".one_shipping_list").click(
				function() {
					$.getJSON("../GoodsServlet?method=quaryAllGoods&pc=" + 1,
							{}, function(data) {
								if (data == "0")
									$("#rightdiv").load("../yf/goodslist.jsp");
							});
				});
		$("#add_shipping_list").click(function() {
			$.getJSON("../GoodsServlet?method=addAllGoods", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/addgoods.jsp");
			});
		});
		$("#select_category_list")
				.click(
						function() {
							$
									.getJSON(
											"../CategoryServlet?method=quaryAllCaregory&pc=" + 1,
											{},
											function(data) {
												if (data == "0")
													$("#rightdiv")
															.load(
																	"../yf/findcategory.jsp");
											});
						});
		$("#add_comment_list").click(function() {
			$.getJSON("../GoodsServlet?method=comment", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/enter.jsp");
			});
		});
		$("#select_brand_list").click(
				function() {
					$.getJSON("../BrandServlet?method=quaryAllBrand", {},
							function(data) {
								if (data == "0")
									$("#rightdiv").load("../yf/brandlist.jsp");
							});
				});
		$.ajaxSettings.async = false;
		$("#dataimport_all").click(function() {
			$.getJSON("../GoodsServlet?method=dateimport", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/dataimport.jsp");
			});
		});
		
		$("#admin_list").click(function() {
			$.getJSON("../AdminServlet?method=queryAllAdmin", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/adminlist.jsp");
			});
		});
		$("#goods_enter").click(function() {
			$.getJSON("../GoodsServlet?method=enterimport", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/goodsupdata.jsp");
			});
		});
		$("#updataimage").click(function() {
			$.getJSON("../GoodsServlet?method=updataimage", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/updataimage.jsp");
			});
		});
	
		$("#goodtype_list").click(function() {
			$.getJSON("../GoodTypeServlet?method=quaryAllType", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/goodtypelist.jsp");
			});
		});
		$("#rolemanneger").click(function() {
			$.getJSON("../roleServlet?method=queryroleList", {}, function(data) {
				if (data == "0")
					$("#rightdiv").load("../yf/rolelist.jsp");
			});
		});
		$("#fone").click(function(){
			$.getJSON(
					"../UserServlet?method=findAllusers&pc="+1, {},
					function(data) {
						if(data=="0")
							$("#rightdiv").load("usersAll.jsp"); 
						});
				});
		var id=$("#userid").val();
		$("#test").diyUpload({
			url:'../AdminServlet?method=updateAdmin&userid='+$("#userid").val(),
			success:function( data ) {
				console.info( data );
			},
			error:function( err ) {
				console.info( err );	
			}
		});
        $(".li_center").click(function(){
        	$.getJSON("../AdminServlet?method=loginVerification",{
        		name:$("#username").val(),
        		password:$("#password").val()
        	},function(data){
        		$("#rightdiv").load("../yf/onecenter.jsp");
                	})
        })
		$('#as').diyUpload({
			url:'../AdminServlet?method=updateAdmin',
			success:function( data ) {
				console.info( data );
			},
			error:function( err ) {
				console.info( err );	
			},
			buttonText : '选择文件',
			chunked:true,
			chunkSize:512 * 1024,
			fileNumLimit:50,
			fileSizeLimit:500000 * 1024,
			fileSingleSizeLimit:50000 * 1024,
			accept: {}
		});
		 $(".diyStart").click(function(){
			$("#box").css("height","50px");
		}) 
	});
</script>
</head>
<body>
	<div
		style="border: 1px solid #000; width: 100%; height: 800px; margin: 0px auto;">
		<div id="topdiv">
			<div id="tleftdiv">
				<span id="topspan1"><img src="../img/logos.png"
					style="width: 70px; height: 80px; margin-top: 15px;"></span> <span
					id="topspan2"><label
					style="color: #e30c03; font-size: 45px;">京东</label>后台</span>
			</div>
			<div id="trightdiv">
			
				<ul id="topul">
					<li>退出</li>
					<li>全屏</li>
					<li>皮肤</li>
				</ul>
				<div id="tmemu">
					<ul id="topul2">
						<li>起始页</li>
						<li>设置导航栏</li>
						<li class="one_shipping_list">商品管理</li>
						<li>订单管理</li>
						<li>图片管理</li>
						<li>用户评论</li>
						<li>商品列表</li>
						<li>订单列表</li>
						<li>会员列表</li>
						<c:forEach items="${admin}" var="ad">
						<li id="" class="li_center" >个人中心
						<input type="hidden" id="username" value="${ad.username }">
			            <input type="hidden" id="password" value="${ad.password}" >
						</li>
						</c:forEach>
					</ul>
				</div>
			</div>
		</div>
		<div id="leftdiv" class="menu_list">
			<p class="menu_head current">商品管理</p>
			<div style="display: none;" class="menu_body">
				<a  class="one_shipping_list">商品列表</a> <a 
					id="add_shipping_list">添加新商品</a> <a 
					id="select_category_list">商品分类</a> <a 
					id="add_comment_list">用户评论</a> <a  id="select_brand_list">商品品牌</a>
				<a  id="goodtype_list">商品类型</a> <a  id="updataimage">图片批量上传</a> <a  id="goods_enter">文件批量导入</a><a 
					id="dataimport_all">商品批量导出</a> 
			</div>
			<p class="menu_head current">权限管理</p>
			<div style="display: none;" class="menu_body">
				<a href="#" id="admin_list">管理员列表</a> <a id="rolemanneger">角色管理</a> <a href="#">子菜单1</a> <a
					href="#">子菜单1</a>
			</div>
			<p class="menu_head current">订单管理</p>
			<div style="display: none;" class="menu_body">
				<a href="#" id="tone">订单列表</a> <a href="#" id="ttwo">订单查询</a> <a
					href="#" id="tthree">新增订单</a> <a href="#" id="tfour">发货列表</a>
			</div>
			<p class="menu_head current">常用菜单</p>
			<div style="display: none;" class="menu_body">
				<a href="#">子菜单1</a> <a href="#">子菜单1</a> <a href="#">子菜单1</a> <a
					href="#">子菜单1</a>
			</div>
			<p class="menu_head current">统计管理</p>
			<div style="display: none;" class="menu_body">
				<a href="#">订单统计</a> <a href="#">销售排行</a> <a href="#">会员排行</a> <a
					href="#">子菜单1</a>
			</div>
			<p class="menu_head current">会员管理</p>
			<div style="display: none;" class="menu_body">
				<a href="#" id="fone">会员列表</a> <a href="#" id="ftwo">添加会员</a>
			</div>
		</div>
		<div id="rightdiv">
		
		<div id="div_information" style="width: 700px;height:400px;margin: 50px auto;border: solid 2px red;">
		<c:forEach items="${admin}" var="ad">
			<div id="div_portrait" style="float: left;"><img style="width: 200px;height: 230px;" src="${ad.portrait }">
			<div id="box">
	<div id="test" class="${ad.userid}" ></div>
</div>
			</div>
			<input type="hidden" id="userid" name="userid" value="${ad.userid}">
			<div id="per_div" style="float: left;border:solid 2px blue;height:360px;width: 320px;">
			<div style="border-bottom:1px dashed #000;width: 220px;height:30px;margin: 0 auto;line-height: 30px;margin-top: 20px;font-family: '宋体';">姓名:&nbsp&nbsp${ad.username }</div>
			<div style="border-bottom:1px dashed  #000;width: 220px;height:30px;margin: 0 auto;line-height: 30px;margin-top: 20px;font-family: '宋体';">职位:&nbsp&nbsp${ad.rolelist }</div>
			<div style="border-bottom:1px dashed  #000;width: 220px;height:30px;margin: 0 auto;line-height: 30px;margin-top: 20px;font-family: '宋体';">邮箱:&nbsp&nbsp${ad.email }</div>
			<div style="border-bottom:1px dashed  #000;width: 220px;height:30px;margin: 0 auto;line-height: 30px;margin-top: 20px;font-family: '宋体';">注册时间:&nbsp${ad.addtime }</div>
			<c:if test="${ad.lastlogin != 'yf'}">
			<div style="border-bottom:1px dashed  #000;width: 220px;height:30px;margin: 0 auto;line-height: 30px;margin-top: 20px;font-family: '宋体';">最近上线:&nbsp${ad.lastlogin }</div>
			</c:if>
			</div>
				</c:forEach>
		</div>
		</div>
	</div>
</body>
</html>